package BasicCmIRPSystem;


/**
 * Generated from IDL interface "_BasicCmIrpOperations".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public abstract class _BasicCmIrpOperationsPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, BasicCmIRPSystem._BasicCmIrpOperationsOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "get_basic_cm_irp_version", new java.lang.Integer(0));
		m_opsHash.put ( "get_basic_cm_irp_notification_profile", new java.lang.Integer(1));
		m_opsHash.put ( "create_managed_object", new java.lang.Integer(2));
		m_opsHash.put ( "get_basic_cm_irp_operation_profile", new java.lang.Integer(3));
		m_opsHash.put ( "find_managed_objects", new java.lang.Integer(4));
		m_opsHash.put ( "modify_managed_objects", new java.lang.Integer(5));
		m_opsHash.put ( "delete_managed_objects", new java.lang.Integer(6));
	}
	private String[] ids = {"IDL:BasicCmIRPSystem/BasicCmIrpOperations:1.0"};
	public BasicCmIRPSystem._BasicCmIrpOperations _this()
	{
		return BasicCmIRPSystem._BasicCmIrpOperationsHelper.narrow(_this_object());
	}
	public BasicCmIRPSystem._BasicCmIrpOperations _this(org.omg.CORBA.ORB orb)
	{
		return BasicCmIRPSystem._BasicCmIrpOperationsHelper.narrow(_this_object(orb));
	}
	public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
		throws org.omg.CORBA.SystemException
	{
		org.omg.CORBA.portable.OutputStream _out = null;
		// do something
		// quick lookup of operation
		java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
		if ( null == opsIndex )
			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
		switch ( opsIndex.intValue() )
		{
			case 0: // get_basic_cm_irp_version
			{
			try
			{
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.VersionNumberSetHelper.write(_out,get_basic_cm_irp_version());
			}
			catch(BasicCmIRPSystem.GetBasicCmIRPVersion _ex0)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.GetBasicCmIRPVersionHelper.write(_out, _ex0);
			}
				break;
			}
			case 1: // get_basic_cm_irp_notification_profile
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.MethodListHelper.write(_out,get_basic_cm_irp_notification_profile(_arg0));
			}
			catch(BasicCmIRPSystem.GetBasicCmIRPNotificationProfile _ex0)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.GetBasicCmIRPNotificationProfileHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex1);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex2)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex2);
			}
				break;
			}
			case 2: // create_managed_object
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				java.lang.String _arg1=_input.read_string();
				BasicCmIRPConstDefs.MOAttributeSetHolder _arg2= new BasicCmIRPConstDefs.MOAttributeSetHolder();
				_arg2._read (_input);
				BasicCmIRPConstDefs.AttributeErrorSeqHolder _arg3= new BasicCmIRPConstDefs.AttributeErrorSeqHolder();
				_out = handler.createReply();
				create_managed_object(_arg0,_arg1,_arg2,_arg3);
				BasicCmIRPConstDefs.MOAttributeSetHelper.write(_out,_arg2.value);
				BasicCmIRPConstDefs.AttributeErrorSeqHelper.write(_out,_arg3.value);
			}
			catch(BasicCmIRPSystem.ObjectClassMismatch _ex0)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.ObjectClassMismatchHelper.write(_out, _ex0);
			}
			catch(BasicCmIRPSystem.IllegalDNFormatException _ex1)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalDNFormatExceptionHelper.write(_out, _ex1);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex2)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex2);
			}
			catch(BasicCmIRPSystem.NoSuchObjectClass _ex3)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.NoSuchObjectClassHelper.write(_out, _ex3);
			}
			catch(BasicCmIRPSystem.CreateManagedObject _ex4)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.CreateManagedObjectHelper.write(_out, _ex4);
			}
			catch(BasicCmIRPSystem.DuplicateMO _ex5)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.DuplicateMOHelper.write(_out, _ex5);
			}
			catch(ManagedGenericIRPSystem.ParameterNotSupported _ex6)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.ParameterNotSupportedHelper.write(_out, _ex6);
			}
			catch(BasicCmIRPSystem.CreateNotAllowed _ex7)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.CreateNotAllowedHelper.write(_out, _ex7);
			}
			catch(BasicCmIRPSystem.UndefinedMOException _ex8)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.UndefinedMOExceptionHelper.write(_out, _ex8);
			}
			catch(BasicCmIRPSystem.ParentObjectDoesNotExist _ex9)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.ParentObjectDoesNotExistHelper.write(_out, _ex9);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex10)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex10);
			}
				break;
			}
			case 3: // get_basic_cm_irp_operation_profile
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.MethodListHelper.write(_out,get_basic_cm_irp_operation_profile(_arg0));
			}
			catch(BasicCmIRPSystem.GetBasicCmIRPOperationProfile _ex0)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.GetBasicCmIRPOperationProfileHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex1);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex2)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex2);
			}
				break;
			}
			case 4: // find_managed_objects
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				BasicCmIRPConstDefs.SearchControl _arg1=BasicCmIRPConstDefs.SearchControlHelper.read(_input);
				java.lang.String[] _arg2=BasicCmIRPConstDefs.AttributeNameSetHelper.read(_input);
				_out = handler.createReply();
				BasicCmIRPSystem.BasicCmInformationIteratorHelper.write(_out,find_managed_objects(_arg0,_arg1,_arg2));
			}
			catch(BasicCmIRPSystem.IllegalScopeLevelException _ex0)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalScopeLevelExceptionHelper.write(_out, _ex0);
			}
			catch(BasicCmIRPSystem.FilterComplexityLimit _ex1)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.FilterComplexityLimitHelper.write(_out, _ex1);
			}
			catch(BasicCmIRPSystem.IllegalScopeTypeException _ex2)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalScopeTypeExceptionHelper.write(_out, _ex2);
			}
			catch(BasicCmIRPSystem.IllegalDNFormatException _ex3)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalDNFormatExceptionHelper.write(_out, _ex3);
			}
			catch(ManagedGenericIRPSystem.ValueNotSupported _ex4)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.ValueNotSupportedHelper.write(_out, _ex4);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex5)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex5);
			}
			catch(BasicCmIRPSystem.FindManagedObjects _ex6)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.FindManagedObjectsHelper.write(_out, _ex6);
			}
			catch(ManagedGenericIRPSystem.ParameterNotSupported _ex7)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.ParameterNotSupportedHelper.write(_out, _ex7);
			}
			catch(BasicCmIRPSystem.UndefinedScopeException _ex8)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.UndefinedScopeExceptionHelper.write(_out, _ex8);
			}
			catch(BasicCmIRPSystem.IllegalFilterFormatException _ex9)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalFilterFormatExceptionHelper.write(_out, _ex9);
			}
			catch(BasicCmIRPSystem.UndefinedMOException _ex10)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.UndefinedMOExceptionHelper.write(_out, _ex10);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex11)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex11);
			}
				break;
			}
			case 5: // modify_managed_objects
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				BasicCmIRPConstDefs.SearchControl _arg1=BasicCmIRPConstDefs.SearchControlHelper.read(_input);
				BasicCmIRPConstDefs.AttributeModification[] _arg2=BasicCmIRPConstDefs.AttributeModificationSetHelper.read(_input);
				_out = handler.createReply();
				BasicCmIRPSystem.ModifyResultIteratorHelper.write(_out,modify_managed_objects(_arg0,_arg1,_arg2));
			}
			catch(BasicCmIRPSystem.IllegalScopeLevelException _ex0)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalScopeLevelExceptionHelper.write(_out, _ex0);
			}
			catch(BasicCmIRPSystem.FilterComplexityLimit _ex1)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.FilterComplexityLimitHelper.write(_out, _ex1);
			}
			catch(BasicCmIRPSystem.IllegalDNFormatException _ex2)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalDNFormatExceptionHelper.write(_out, _ex2);
			}
			catch(BasicCmIRPSystem.IllegalScopeTypeException _ex3)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalScopeTypeExceptionHelper.write(_out, _ex3);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex4)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex4);
			}
			catch(BasicCmIRPSystem.UndefinedScopeException _ex5)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.UndefinedScopeExceptionHelper.write(_out, _ex5);
			}
			catch(BasicCmIRPSystem.IllegalFilterFormatException _ex6)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalFilterFormatExceptionHelper.write(_out, _ex6);
			}
			catch(BasicCmIRPSystem.UndefinedMOException _ex7)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.UndefinedMOExceptionHelper.write(_out, _ex7);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex8)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex8);
			}
			catch(BasicCmIRPSystem.ModifyManagedObjects _ex9)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.ModifyManagedObjectsHelper.write(_out, _ex9);
			}
				break;
			}
			case 6: // delete_managed_objects
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				BasicCmIRPConstDefs.SearchControl _arg1=BasicCmIRPConstDefs.SearchControlHelper.read(_input);
				_out = handler.createReply();
				BasicCmIRPSystem.DeleteResultIteratorHelper.write(_out,delete_managed_objects(_arg0,_arg1));
			}
			catch(BasicCmIRPSystem.IllegalScopeLevelException _ex0)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalScopeLevelExceptionHelper.write(_out, _ex0);
			}
			catch(BasicCmIRPSystem.FilterComplexityLimit _ex1)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.FilterComplexityLimitHelper.write(_out, _ex1);
			}
			catch(BasicCmIRPSystem.IllegalDNFormatException _ex2)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalDNFormatExceptionHelper.write(_out, _ex2);
			}
			catch(BasicCmIRPSystem.IllegalScopeTypeException _ex3)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalScopeTypeExceptionHelper.write(_out, _ex3);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex4)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex4);
			}
			catch(BasicCmIRPSystem.UndefinedScopeException _ex5)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.UndefinedScopeExceptionHelper.write(_out, _ex5);
			}
			catch(BasicCmIRPSystem.IllegalFilterFormatException _ex6)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.IllegalFilterFormatExceptionHelper.write(_out, _ex6);
			}
			catch(BasicCmIRPSystem.UndefinedMOException _ex7)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.UndefinedMOExceptionHelper.write(_out, _ex7);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex8)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex8);
			}
			catch(BasicCmIRPSystem.DeleteManagedObjects _ex9)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.DeleteManagedObjectsHelper.write(_out, _ex9);
			}
				break;
			}
		}
		return _out;
	}

	public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
	{
		return ids;
	}
}
